package cn.yy.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Profit entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "profit", catalog = "phoneerp")
public class Profit implements java.io.Serializable {

	// Fields

	private Integer id;
	private Year year;
	private Month month;
	private Double operationsSales;
	private Double operatingCosts;
	private Double operatingTaxAndAdditions;
	private Double sellingExpense;
	private Double generalExpense;
	private Double researchAndDevelopmentCosts;
	private Double financialExpense;
	private Double lossesOnTheAssetImpairment;
	private Double operatingProfit;
	private Double nonOperatingIncomeAdd;
	private Double nonOperatingIncomeLess;
	private Double totalProfit;
	private Double incomeTax;
	private Double netIncome;
	private Double totalSum;
	private Integer accountInChartId;

	// Constructors

	/** default constructor */
	public Profit() {
	}

	/** full constructor */
	public Profit(Year year, Month month, Double operationsSales,
			Double operatingCosts, Double operatingTaxAndAdditions,
			Double sellingExpense, Double generalExpense,
			Double researchAndDevelopmentCosts, Double financialExpense,
			Double lossesOnTheAssetImpairment, Double operatingProfit,
			Double nonOperatingIncomeAdd, Double nonOperatingIncomeLess,
			Double totalProfit, Double incomeTax, Double netIncome,
			Double totalSum, Integer accountInChartId) {
		this.year = year;
		this.month = month;
		this.operationsSales = operationsSales;
		this.operatingCosts = operatingCosts;
		this.operatingTaxAndAdditions = operatingTaxAndAdditions;
		this.sellingExpense = sellingExpense;
		this.generalExpense = generalExpense;
		this.researchAndDevelopmentCosts = researchAndDevelopmentCosts;
		this.financialExpense = financialExpense;
		this.lossesOnTheAssetImpairment = lossesOnTheAssetImpairment;
		this.operatingProfit = operatingProfit;
		this.nonOperatingIncomeAdd = nonOperatingIncomeAdd;
		this.nonOperatingIncomeLess = nonOperatingIncomeLess;
		this.totalProfit = totalProfit;
		this.incomeTax = incomeTax;
		this.netIncome = netIncome;
		this.totalSum = totalSum;
		this.accountInChartId = accountInChartId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "yearId", nullable = false)
	public Year getYear() {
		return this.year;
	}

	public void setYear(Year year) {
		this.year = year;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "monthId", nullable = false)
	public Month getMonth() {
		return this.month;
	}

	public void setMonth(Month month) {
		this.month = month;
	}

	@Column(name = "operationsSales", nullable = false, precision = 22, scale = 0)
	public Double getOperationsSales() {
		return this.operationsSales;
	}

	public void setOperationsSales(Double operationsSales) {
		this.operationsSales = operationsSales;
	}

	@Column(name = "operatingCosts", nullable = false, precision = 22, scale = 0)
	public Double getOperatingCosts() {
		return this.operatingCosts;
	}

	public void setOperatingCosts(Double operatingCosts) {
		this.operatingCosts = operatingCosts;
	}

	@Column(name = "operatingTaxAndAdditions", nullable = false, precision = 22, scale = 0)
	public Double getOperatingTaxAndAdditions() {
		return this.operatingTaxAndAdditions;
	}

	public void setOperatingTaxAndAdditions(Double operatingTaxAndAdditions) {
		this.operatingTaxAndAdditions = operatingTaxAndAdditions;
	}

	@Column(name = "sellingExpense", nullable = false, precision = 22, scale = 0)
	public Double getSellingExpense() {
		return this.sellingExpense;
	}

	public void setSellingExpense(Double sellingExpense) {
		this.sellingExpense = sellingExpense;
	}

	@Column(name = "generalExpense", nullable = false, precision = 22, scale = 0)
	public Double getGeneralExpense() {
		return this.generalExpense;
	}

	public void setGeneralExpense(Double generalExpense) {
		this.generalExpense = generalExpense;
	}

	@Column(name = "researchAndDevelopmentCosts", nullable = false, precision = 22, scale = 0)
	public Double getResearchAndDevelopmentCosts() {
		return this.researchAndDevelopmentCosts;
	}

	public void setResearchAndDevelopmentCosts(
			Double researchAndDevelopmentCosts) {
		this.researchAndDevelopmentCosts = researchAndDevelopmentCosts;
	}

	@Column(name = "fInancialExpense", nullable = false, precision = 22, scale = 0)
	public Double getFinancialExpense() {
		return this.financialExpense;
	}

	public void setFinancialExpense(Double financialExpense) {
		this.financialExpense = financialExpense;
	}

	@Column(name = "lossesOnTheAssetImpairment", nullable = false, precision = 22, scale = 0)
	public Double getLossesOnTheAssetImpairment() {
		return this.lossesOnTheAssetImpairment;
	}

	public void setLossesOnTheAssetImpairment(Double lossesOnTheAssetImpairment) {
		this.lossesOnTheAssetImpairment = lossesOnTheAssetImpairment;
	}

	@Column(name = "operatingProfit", nullable = false, precision = 22, scale = 0)
	public Double getOperatingProfit() {
		return this.operatingProfit;
	}

	public void setOperatingProfit(Double operatingProfit) {
		this.operatingProfit = operatingProfit;
	}

	@Column(name = "nonOperatingIncomeAdd", nullable = false, precision = 22, scale = 0)
	public Double getNonOperatingIncomeAdd() {
		return this.nonOperatingIncomeAdd;
	}

	public void setNonOperatingIncomeAdd(Double nonOperatingIncomeAdd) {
		this.nonOperatingIncomeAdd = nonOperatingIncomeAdd;
	}

	@Column(name = "nonOperatingIncomeLess", nullable = false, precision = 22, scale = 0)
	public Double getNonOperatingIncomeLess() {
		return this.nonOperatingIncomeLess;
	}

	public void setNonOperatingIncomeLess(Double nonOperatingIncomeLess) {
		this.nonOperatingIncomeLess = nonOperatingIncomeLess;
	}

	@Column(name = "totalProfit", nullable = false, precision = 22, scale = 0)
	public Double getTotalProfit() {
		return this.totalProfit;
	}

	public void setTotalProfit(Double totalProfit) {
		this.totalProfit = totalProfit;
	}

	@Column(name = "incomeTax", nullable = false, precision = 22, scale = 0)
	public Double getIncomeTax() {
		return this.incomeTax;
	}

	public void setIncomeTax(Double incomeTax) {
		this.incomeTax = incomeTax;
	}

	@Column(name = "netIncome", nullable = false, precision = 22, scale = 0)
	public Double getNetIncome() {
		return this.netIncome;
	}

	public void setNetIncome(Double netIncome) {
		this.netIncome = netIncome;
	}

	@Column(name = "totalSum", nullable = false, precision = 22, scale = 0)
	public Double getTotalSum() {
		return this.totalSum;
	}

	public void setTotalSum(Double totalSum) {
		this.totalSum = totalSum;
	}

	@Column(name = "account_in_chart_ID", nullable = false)
	public Integer getAccountInChartId() {
		return this.accountInChartId;
	}

	public void setAccountInChartId(Integer accountInChartId) {
		this.accountInChartId = accountInChartId;
	}

}